function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _wrapRegExp(){_wrapRegExp=function(e,t){return new o(e,void 0,t)};var n=RegExp.prototype,l=new WeakMap;function o(e,t,r){t=new RegExp(e,t);return l.set(t,r||l.get(e)),_setPrototypeOf(t,o.prototype)}function a(n,e){var a=l.get(e);return Object.keys(a).reduce(function(e,t){var r=a[t];if("number"==typeof r)e[t]=n[r];else{for(var o=0;void 0===n[r[o]]&&o+1]+)>/g,function(e,t){t=r[t];return"$"+(Array.isArray(t)?t.join("$"):t)}))):"function"==typeof t?(o=this,n[Symbol.replace].call(this,e,function(){var e=arguments;return"object"!=_typeof(e[e.length-1])&&(e=[].slice.call(e)).push(a(e,o)),t.apply(this,e)})):n[Symbol.replace].call(this,e,t)},_wrapRegExp.apply(this,arguments)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);re.length)&&(t=e.length);for(var r=0,o=new Array(t);re-r){for(var a=o[n].rowSpan-e+r,l=(o[n].rowSpan=e-r,o[n].dataset.sameCellBeforeDivision||(o[n].dataset.sameCellBeforeDivision="r"+r+"c"+n),void 0),l=t.hasOwnProperty("wptbCell")?(l=new t.wptbCell(t.mark)).getDOMElement():document.createElement("td"),i=o[n].getAttribute("style"),i=(l.setAttribute("style",i),l.colSpan=o[n].colSpan,l.rowSpan=a,l.dataset.sameCellBeforeDivision=o[n].dataset.sameCellBeforeDivision,o[n].dataset.xIndex),s=parseInt(i)+parseInt(o[n].colSpan),c=void 0;!c&&se){l=t.hasOwnProperty("wptbCell")?(l=new t.wptbCell(t.mark)).getDOMElement():document.createElement("td"),o=a[c].rowSpan,n=a[c].colSpan,a[c].colSpan=e-a[c].dataset.xIndex,n=n-a[c].colSpan,a[c].dataset.sameCellBeforeDivision||(a[c].dataset.sameCellBeforeDivision="r"+r+"c"+c);var d=a[c].getAttribute("style"),d=(l.setAttribute("style",d),t.querySelector('[data-x-index="'+e+'"]')),d=(d&&(l.style.width=d.style.width),t.querySelector('[data-y-index="'+r+'"]'));d&&(l.style.height=d.style.height),s=a[c+1]||null,t.rows[r].insertBefore(l,s),l.colSpan=n,l.rowSpan=o,l.dataset.sameCellBeforeDivision=a[c].dataset.sameCellBeforeDivision,r+=o-1;break}WPTB_RecalculateIndexes(t)}},glueTableVertically:function(e){if(e){for(var t=_toConsumableArray(e.getElementsByTagName("td")),r=0;re.length)&&(t=e.length);for(var r=0,o=new Array(t);rn?r.classList.add("sortable-hover"):r.classList.remove("sortable-hover")}function c(e){t(e,"vertical",this)}function d(e){t(e,"horizontal",this)}function u(){this.classList.remove("sortable-hover")}function r(e,t){if(e.target&&"TD"===e.target.tagName&&!U.parentNode.classList.contains("wptb-preview-table-manage-cells")){var r=e.currentTarget,o=!1;if("vertical"===t&&e.target.dataset.hasOwnProperty("sortedVertical")){var n=[],a=[];if(this.itemsPerHeader&&this.itemsPerHeaderparseInt(e.target.dataset.yIndex,10)+this.itemsPerHeader&&(a.push(l[s]),i.removeChild(l[s]));WPTB_RecalculateIndexes(r)}var c,d,u=r.querySelectorAll('[data-x-index="'.concat(e.target.dataset.xIndex,'"]'));(u=_toConsumableArray(u)).map(function(e){c=(c=parseInt(e.rowSpan,10))||1,d=e.dataset.yIndex,WPTB_CutGlueTable.cutTableHorizontally(d,r),d+=c,WPTB_CutGlueTable.cutTableHorizontally(d,r)});for(var M,p=[],W=0,z=[],b=0;be.target.dataset[d]){r.splice(o,0,y[m]),f=!0,o--;break}if(f)return{tds:r,i:o};a=(a=parseInt(b[u],10))||1;if(o==r.length-1&&parseInt(b.dataset[c],10)+ae.target.dataset[d]){r.push(y[h]),f=!0;break}}return!!f&&{tds:r}}return this.itemsPerHeader=0,this.tableMaxCols=U.maxCols,this.cellsStylesScheme={},this.rowsStylesScheme={},this.sortModeSwitcher=function(e,t){t&&(this.sortModeSwitcher("horizontal",!1),this.sortModeSwitcher("vertical",!1)),"vertical"===e?(this.table.removeEventListener("click",this.sortableTableVerticalStart,!1),t?(this.sortingCellMouseMoveSwitcher("vertical",!0),this.table.addEventListener("click",this.sortableTableVerticalStart,!1),this.table.dataset.wptbSortableTableVertical="1",this.createTableElementsStylesScheme("td"),this.createTableElementsStylesScheme("tr")):(this.sortingCellMouseMoveSwitcher("vertical",!1),delete this.table.dataset.wptbSortableTableVertical)):"horizontal"===e&&(this.table.removeEventListener("click",this.sortableTableHorizontalStart,!1),t?(this.sortingCellMouseMoveSwitcher("horizontal",!0),this.table.addEventListener("click",this.sortableTableHorizontalStart,!1),this.table.dataset.wptbSortableTableHorizontal="1",this.createTableElementsStylesScheme("td"),this.createTableElementsStylesScheme("tr")):(this.sortingCellMouseMoveSwitcher("horizontal",!1),delete this.table.dataset.wptbSortableTableHorizontal))},this.tableObjectChange=function(){var e=!(0o&&(o=t.length),0==l&&(n=i)}e.columns=o,e.maxCols=n};function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);re.length)&&(t=e.length);for(var r=0,o=new Array(t);r')).childNodes[0]);return o.appendChild(r),u.rowCache.push(r),{el:r,id:u.rowCache.length-1}},this.clearTable=function(){u.rowCache=[],u.tableElement.querySelector("tbody").innerHTML=""},this.getRow=function(e){return u.rowCache[e]||(s("no row with id [".concat(e,"] found in the cache."),"warn"),null)},this.maxRows=function(){return u.parsedTable.length},this.maxColumns=function(e){return e?u.parsedTable[0].length:u.parsedTable.reduce(function(e,t){return e=t.length>e?t.length:e},0)},this.getCell=function(e,t){var r=2=r[e].width&&(o=e)}),o},this.rebuildTable=function(e,t,r){var o=j.getDirective(e);if(o&&c(o)){var n=o.responsiveMode,a=j["".concat(n,"Build")],l=(t=t||e.getBoundingClientRect().width,j.calculateRangeId(t,o.breakpoints));if(!a)throw new Error("No build mode named as [".concat(n,"] found."));var i=o.modeOptions[n],t=(d(o,t)?a.call(j,e,l,i,r):(r.clearTable(),j.buildDefault(r),j.removeDefaultClasses(e)),WPTB_RecalculateIndexes(e),new CustomEvent("table:rebuilt",{detail:{sizeRangeId:l,topRowAsHeader:o.modeOptions[n].topRowAsHeader}}));e.dispatchEvent(t),a=l,(i=e)&&a&&(i.dataset.wptbBreakpoint=a)}},this.rebuildTables=function(r){j.elementObjects.map(function(e){var t=r;r||(t=o(e.el)),j.rebuildTable(e.el,t,e.tableObject)})},this.calculateRangeIdFromTable=function(e){var t=j.getDirective(e),e=o(e);return j.calculateRangeId(e,t.breakpoints)},this.isResponsiveEnabledForCurrentBreakpoint=function(e){var t=j.getDirective(e);return t&&c(t)&&d(t,o(e))},this.options.bindToResize&&this.bindRebuildToResize(),this.getTableElementObject=function(t){var e=j.elementObjects.filter(function(e){e=e.el.parentNode,e=new RegExp(/^wptb-table-id-(\d+)$/).exec(e.getAttribute("id"));return e&&e[1]&&Number.parseInt(e[1],10)===t});return _slicedToArray(e,1)[0]},this.markRowForResponsive=function(e,t){e.dataset.wptbResponsiveIgnore=JSON.stringify(t)},{rebuildTables:this.rebuildTables,rebuildTable:this.rebuildTable,getDirective:this.getDirective,calculateRangeId:this.calculateRangeId,calculateRangeIdFromTable:this.calculateRangeIdFromTable,isResponsiveEnabledForCurrentBreakpoint:this.isResponsiveEnabledForCurrentBreakpoint,getTableElementObject:this.getTableElementObject,markRowForResponsive:this.markRowForResponsive,calculateInnerSize:o,TableObject:t}}}),function(e,t,r){t[e]=r()}("WPTB_StylePass",self||global,function(){return new function(){var l=this;this.options={stylesheets:{}},this.insertShadowRoot=function(e,t){var r=t.parentNode,o=Array.from(r.children),n=o.indexOf(t),a=0=o.length?null:o[n+1];l.prepareAllStylesheets(l.options.stylesheets,e.shadowRoot),l.borrowFromTheme(t),e.shadowRoot.appendChild(t),a?a.insertAdjacentElement("afterend",e):o?o.insertAdjacentElement("beforebegin",e):r.appendChild(e)},this.borrowFromTheme=function(e){var e=e.querySelector("table"),t=getComputedStyle(e).fontFamily;e.style.fontFamily=t},this.init=function(e){l.options=_objectSpread(_objectSpread({},l.options),e);e=Array.from(document.querySelectorAll("div .wptb-table-container"));0'.concat(c.iconSvg,""),r=o.querySelector("svg"),(a=o.querySelector(".wptb-lazy-load-buffer-icon-wrapper")).style.width="".concat(c.iconSize,"px"),a.style.height="".concat(c.iconSize,"px"),a.dataset.wptbLazyLoadIconAnimation=c.iconAnimation,r)&&(r.style.fill=c.iconColor),t.insertAdjacentElement("afterend",o),t.parentNode.classList.add(u),p.beforeAnimation(t)),(!c.forceMode||s)&&(n=e,a=l,c.forceMode||b(n,a))&&(n.dataset.wptbLazyLoadStatus="true",n.addEventListener("load",c.delay?function(){setTimeout(function(){f({target:n})},1e3*c.delay)}:f),n.src=n.dataset.wptbLazyLoadTarget)}),t=window.scrollY,a.lastYPosition=t}function o(){return window.innerHeight}function t(){var e=Array.from(document.querySelectorAll(".wptb-preview-table")),t=Array.from(document.querySelectorAll(".wptb-shadow-root-container")).reduce(function(e,t){t=t.shadowRoot.querySelector(".wptb-preview-table");return t&&e.push(t),e},[]),e=[].concat(e,_toConsumableArray(t));l.push.apply(l,_toConsumableArray(e.reduce(function(e,t){t=Array.from(t.querySelectorAll(".wptb-lazy-load-img"));return e.push.apply(e,t),e},[]))),r(l,o(),!0),c.forceMode||window.addEventListener("scroll",function(){r(l,o())},{passive:!0})}var n={forceMode:!1},c={},a={lastYPosition:0},l=[],d="wptb-lazy-load-buffer-element",u="wptb-lazy-load-buffer-element-container",i=new e(s),p=null,b=function(e,t){var e=e.parentNode.getBoundingClientRect(),r=e.top,o=e.height,e=e.bottom,n=c.visibilityPercentage,r=0<=window.scrollY-a.lastYPosition?r+o*(n/100):e-o*(n/100);return 0<=r&&r<=t},f=function e(t){t=t.target;p.animate(t),t.removeEventListener("load",e),p.afterAnimation(t)};this.forceLoadImages=function(){r(l,null,!1,!0)},this.init=function(e){e&&"object"===_typeof(e)&&(c=_objectSpread(_objectSpread({},n),e)).enabled&&(p=i.getAnimation(c.imageLoadAnimation,_objectSpread({speed:c.imageLoadAnimationSpeed,direction:c.imageLoadAnimationDirection,perspective:c.imageLoadAnimationPerspective},c)),t())}}}),function(e,t,r){t[e]=r()}("WPTB_ScrollManager",self||global,function(){return function(e){function t(e){var t=e.parentNode.parentNode,e=e.parentNode,r=(t.dataset.wptbHorizontalScrollStatus="true",t.style.maxWidth);t.style.maxWidth="",e.style.width=r}var r=e.frontendCalculationStatus;this.init=function(){var e=Array.from(document.querySelectorAll("table[data-wptb-horizontal-scroll-status=true]"));r&&e.map(t)}}}),document.addEventListener("DOMContentLoaded",function(){var F=document.getElementsByClassName("wptb-table-container");function e(){for(var e=0;e